﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGsDCPoint : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGsDCPoint(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGsDCPoint obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGsDCPoint()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGsDCPoint(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGsDCPoint() : this(GlobalsPINVOKE.new_OdGsDCPoint__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGsDCPoint(int xx, int yy) : this(GlobalsPINVOKE.new_OdGsDCPoint__SWIG_1(xx, yy), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGsDCPoint(OdGsDCPoint.MaxFlag arg0) : this(GlobalsPINVOKE.new_OdGsDCPoint__SWIG_2((int)arg0), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGsDCPoint(OdGsDCPoint.MinFlag arg0) : this(GlobalsPINVOKE.new_OdGsDCPoint__SWIG_3((int)arg0), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void Assign(OdGsDCPoint.MaxFlag arg0)
		{
			GlobalsPINVOKE.OdGsDCPoint_Assign__SWIG_0(this.swigCPtr, (int)arg0);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void Assign(OdGsDCPoint.MinFlag arg0)
		{
			GlobalsPINVOKE.OdGsDCPoint_Assign__SWIG_1(this.swigCPtr, (int)arg0);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void Assign(OdGsDCPoint dcPoint)
		{
			GlobalsPINVOKE.OdGsDCPoint_Assign__SWIG_2(this.swigCPtr, OdGsDCPoint.getCPtr(dcPoint));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool IsEqual(OdGsDCPoint dcPoint)
		{
			bool result = GlobalsPINVOKE.OdGsDCPoint_IsEqual(this.swigCPtr, OdGsDCPoint.getCPtr(dcPoint));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGsDCPoint dcPoint)
		{
			bool result = GlobalsPINVOKE.OdGsDCPoint_IsNotEqual(this.swigCPtr, OdGsDCPoint.getCPtr(dcPoint));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int GetItem(uint i)
		{
			int result = GlobalsPINVOKE.OdGsDCPoint_GetItem(this.swigCPtr, i);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int x
		{
			get
			{
				int result = GlobalsPINVOKE.OdGsDCPoint_x_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGsDCPoint_x_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public int y
		{
			get
			{
				int result = GlobalsPINVOKE.OdGsDCPoint_y_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGsDCPoint_y_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;

		public enum MaxFlag
		{
			Maximum
		}

		public enum MinFlag
		{
			Minimum
		}
	}
}
